/*
 * Copyright (c) 2011 Ondrej Lapacek
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you
 * may not use this file except in compliance with the License. You may
 * obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

/**
 * Keeps two lists of outer and inner ways.
 * 
 * 
 * @author      Ondrej Lapacek
 * @version     1.0, 28/11/11
 * @since       1.0
 */

package cz.muni.fi.android.assistivecamera.osm.model;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;


public class Relation extends Primitive {

    private LinkedList<Way> outerWays = new LinkedList<Way>();
    private LinkedList<Way> innerWays = new LinkedList<Way>();

    public Relation(long id) {
        super(id);
    }
          
    public void addOuterWay(Way w) {
        this.outerWays.add(w);
    }
      
    public void addInnerWay(Way w) {
        this.innerWays.add(w);
    }
    
    public List<Way> getOuterWayList() {
        return Collections.unmodifiableList(this.outerWays);
    }
    
    public List<Way> getInnerWayList() {
        return Collections.unmodifiableList(this.innerWays);
    }
    
    @Override
    public String getType() {
        return "relation";
    }
}
